<?php

/**
 * Common Template - tpl_header.php
 *
 */

?>

<?php
  // Display all header alerts via messageStack:
  if ($messageStack->size('header') > 0) {
    echo $messageStack->output('header');
  }

  if (isset($_GET['error_message']) && zen_not_null($_GET['error_message'])) {
	echo htmlspecialchars(urldecode($_GET['error_message']));
  }
  if (isset($_GET['info_message']) && zen_not_null($_GET['info_message'])) {
	echo htmlspecialchars($_GET['info_message']);
	} else {
}

?>

<!--bof-header logo and navigation display-->
<?php

if (!isset($flag_disable_header) || !$flag_disable_header) {
	echo '<div id="headerblock">';
?>

<!--bof-branding display-->

    <?php switch ($current_page){
			    	case 'checkout_shipping':
			    	case 'checkout_payment':
			    	case 'checkout_login':
			    	case 'checkout_shipping_address':
			    	case 'address_book_process':
    	      ?>
				<div class="ck_w center">
				    <ul id="intro">
						<?php if($this_is_home_page){?>
							<li class="index_logo"><?php echo '<a href="' . HTTP_SERVER . DIR_WS_CATALOG . '" title="'. SEO_COMMON_KEYWORDS.' '.STORE_NAME .'"><span class="hand">' . zen_image($template->get_template_dir(HEADER_LOGO_IMAGE, DIR_WS_TEMPLATE, $current_page_base,'images'). '/' . HEADER_LOGO_IMAGE, HEADER_ALT_TEXT) . '</span></a>'; ?></li>
						<?php }else{ ?>
							<li class="logo"><?php echo '<a href="' . HTTP_SERVER . DIR_WS_CATALOG . '" onfocus="if( this.blur ) this.blur();"><span class="hand">' . zen_image($template->get_template_dir(HEADER_LOGO_IMAGE, DIR_WS_TEMPLATE, $current_page_base,'images'). '/' . HEADER_LOGO_IMAGE, HEADER_ALT_TEXT) . '</span></a>'; ?></li>
						<?php } ?>
				    </ul>
				    <li class="fr">
						<img height="44" width="94" border="0" src="includes/templates/<?php echo $template_dir; ?>/images/logo/gif_logo1.gif" style="margin: 0pt 12px 4px 0pt;"/>
						<img border="0" alt="wholesale Check to Verisign" title="wholesale Check to Verisign " src="includes/templates/<?php echo $template_dir; ?>/images/logo/gif_logo2.gif"/>
					</li>
				</div>

		<?php break;
		      default:
		      require($template->get_template_dir('tpl_modules_header_right.php',DIR_WS_TEMPLATE, $current_page_base,'templates'). '/tpl_modules_header_right.php'); 
		      ?>
		<?php } ?>

<br class="clear" />
<!--eof-branding display-->
<!--eof-header logo and navigation display-->

</div>
<?php } ?>